package com.yihu.cms.service;

import java.io.IOException;
import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.List;

import com.yihu.beans.ArtworkCategory;
import com.yihu.dataService.hessian.mongodb.interfaceService.ArtworkCategoryHService;
import com.yihu.dataService.hessian.resource.ResourceMongoDBManager;

public class ArtworkCategoryService {
	
	public List<ArtworkCategory> getAll() {
		List<ArtworkCategory> result = new ArrayList<ArtworkCategory>();
		try {
			ArtworkCategoryHService artworkAuthor = (ArtworkCategoryHService) ResourceMongoDBManager
					.getSingleton().getBeans("artworkCategoryHSC");

			result = artworkAuthor.getAllArtworkCategory();
		} catch (MalformedURLException e) {
			System.out.println(e.toString());
		} catch (IOException e1) {
			e1.printStackTrace();
		}
		
		return result;
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

}
